DTRACE32 Usage ----- Start DTRACE32 and it registers itself to the Win95/NT40 Task-Tray. By clicking on its icon you open the main-form with a list of all events occured so far. By double-clicking on the tray-icon the main-form hides again. Debug messages can be sent with three levels of severity: Information,Warning and Error The levels are represented by tiny icons known from the NT Event Viewer. If you click on an event, you get detailed information about the event in the statusbar of DTrace32. If no MAP-file is available, the name of the calling application, the address of the calling routine and the timestamp of the message are displayed. If a detailed MAP-file exists, the name of the calling procedure, the modulename where the procedure can be found and the line-number in the module are displayed also. To send debug-messages simply include the unit UTRACE in the module you want to monitor and use the procedures provided by the dll. The procedures are always present in two forms, a standard form that simply displays a text and a *fmt version that accepts format strings as used in StrFmt and FmtStr. The units provides you with the following functions: procedure Assert(Condition : Boolean;TheText : String); procedure AssertFmt(Condition : Boolean;TheFormat : String;const Args: Array of const); Assertation functions as known in C if the condition used is false, a debugmessage is sent and the program stops. procedure DebugDump(TheText : String;Address : Pointer;Count : Integer); Dumps a hex-dump to DTrace32 procedure DebugInfo(TheText : String); procedure DebugInfoFmt(TheFormat : String;const Args: Array of const); Sends messages of class information to DTrace32 procedure DebugWarn(TheText : String); procedure DebugWarnFmt(TheFormat : String;const Args: Array of const); Sends messages of class warning to DTrace32 procedure DebugErr(TheText : String); procedure DebugErrFmt(TheFormat : String;const Args: Array of const); Sends messages of class error to DTrace32 procedure Debug(TheSeverity : TDebugSeverity;TheText : String); procedure DebugFmt(TheSeverity : TDebugSeverity;TheFormat : String;const Args: Array of const); 'low level' ;-) message functions DTrace32 works with windowed applications and with console applications too. There also exists a unit UNOTRACE that can be included instead of UTRACE to quickly turn of Debug-messages for a unit. This Unit consists of the same procedures but does not do anything. Please note: if your application goes final you should remove all references to procedures of the UTrace and UNoTrace. Even if the procedures in UNoTrace do nothing, Delphi still puts all parameters on the stack when it calls the (do-nothing) procedures. Comments -------- I am eagerly awaiting your comments on how to improve this application. I have not included the source-code of the DTRACE32 Application itself because it uses other components that i have written (SavePosition, AddToTray ...) that are not 100% ready for distribution. If you are interested in the complete source code and want to beta-test the components, please drop me a line, i will be happy to send you the complete source-code. Contacting the author --------------------- I can be contacted via e-mail: ring@abo.rhein-zeitung.de or 71042,105@compuserve.com (or so...) please note, that ring@abo.rhein-zeitung.de will be disabled in Nov or Dec 1996 because i will move to another city soon. I will post an update of the application as soon as i have my new (final???) internet-address. {start paste} Distribution ------------ You are hereby licensed to make as many copies of DTRACE32 as you wish and provide them to anyone as long as: the DTRACE32 distribution is not modified in any way, and you do not charge any money for any of the copies of DTRACE32 you make. If you wish to include DTRACE32 in any sort of distribution that will be sold commercially or otherwise, you must get written permission from the author. A small royalty may be charged depending on the nature of the distribution. All rights not expressly granted are reserved to Michael Ring. Disclaimer ---------- THE INFORMATION, CODE AND EXECUTABLES PROVIDED ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICHAEL RING BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS, OR SPECIAL DAMAGES, EVEN IF MICHAEL RING HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. {end paste} ;-)